<div class="row m-n">
    <div class="crumbs-bar">
        <div yb-crumbs></div>
    </div>
    <div tabset type="tab">
        <div tab heading="期初条码打印" active="activeFlag[0]">
            <div class="row wrapper-y-sm">
                <div class="operate-bar col-xs-8 font-0">
                    <button type="button" class="btn btn-operate m-r-sm" ng-click="batchPrint('preview')"
                            ng-disabled="!btnPermission.basisCodePrint" translate translate-attr-title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">打印预览</button>
                    <button type="button" class="btn btn-operate m-r-sm" ng-click="batchPrint('print')"
                            ng-disabled="!btnPermission.basisCodePrint" translate translate-attr-title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">打印</button>
                    <button class="btn btn-operate m-r-sm" ng-click="switchToolbar('PrintConf')"
                            ng-disabled="!btnPermission.basisCodePrint" translate translate-attr-title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">打印配置</button>
                </div>
                <div class="search-bar wrapper-none col-xs-4">
                    <div class="btn-group m-l-xs pull-right">
                        <button type="button" class="btn btn-default base-color" ng-click="search()" translate translate-attr-title="刷新">
                            <i class="yb-icon ico-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-default base-color" translate translate-attr-title="配置表格列"
                                ng-click="switchToolbar('ColConfig');">
                            <i class="yb-icon ico-set"></i>
                        </button>
                    </div>
                    <button class="btn-advance pull-right m-l-xs" ng-click="switchToolbar('AdvanceSearch')" translate-attr-title="高级搜索" translate="高级搜索more"></button>
                    <div class="input-group pull-right clearfix">
                        <input type="text" class="form-control txt-search" translate translate-attr-placeholder="零件编号,多个请用逗号分隔"
                               ng-model="condition.materialsNos">
                        <span class="input-group-addon cursor-pointer" ng-click="search(1)" translate>搜索</span>
                    </div>
                </div>
            </div>
            <div yb-col-config show-toolbar="toolbarConfig.showColConfig" ng-model="tbConf" col-fixed="true"
                 has-check-col="true" set-tb-style="setFixedWidth()"></div>
            <div yb-advance-search show-toolbar="toolbarConfig.showAdvanceSearch" search-data="search(1)"
                 reset-data="reset()" date-picker="true" hide-date="switchDatePicker()">
                <div class="advance-search m-t-sm">
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>零件编号</span>：</label>
                        <input type="text" name="materialsNo" ng-model="condition.materialsNos" class="form-control"
                            translate translate-attr-placeholder="零件编号,多个请用逗号分隔">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>入库单号</span>：</label>
                        <input type="text" name="materialsNo" ng-model="condition.billNo" class="form-control">
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"><span translate>导入人</span>：</label>
                        <input type="text" name="materialsNo" ng-model="condition.createName" class="form-control">
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"><span translate>导入时间</span>：</label>
                        <input type="text" class="form-control date-picker" ng-model="condition.dateBegin"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDatePicker(0)" is-open="datePickerFlag[0]" close-text="关闭"
                               ng-change="checkDate(condition, 'dateBegin', 'dateEnd')" modal-size="small" readonly>
                    </div>
                    <div class="form-group clearfix m-b-none">
                        <label class="control-label"></label>
                        <label class="control-label wave-line">~</label>
                    </div>
                    <div class="form-group clearfix">
                        <label class="control-label"></label>
                        <input type="text" class="form-control date-picker" ng-model="condition.dateEnd"
                               datepicker-popup="{{'yyyy-MM-dd'}}" ng-click="switchDatePicker(1)" is-open="datePickerFlag[1]" close-text="关闭"
                               ng-change="checkDate(condition, 'dateBegin', 'dateEnd')" modal-size="small" readonly>
                    </div>
                </div>
            </div>
            <div yb-print-conf show-toolbar="toolbarConfig.showPrintConf" ng-model="tempSet"></div>

            <div class="main-area">
                <div yb-table-fixed class="table-fixed-wrap fix-left" ele-count="4" scroll-area="right">
                    <div class="th-fixed">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <thead>
                            <tr>
                                <th width="40" class="text-center th-check border-l-none">
                                    <div yb-check-box yb-checked="markInfo.allChecked" yb-click="selectAll()"></div>
                                </th>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.fixedWidth"
                                         fixed-width="tbStyle.scrollLeft"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="th-scroll-x" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <thead>
                            <tr>
                                <th ng-repeat="itemCol in tbConf.tableCol track by $index" width="{{itemCol.width}}"
                                    ng-click="toSort(tbConf.tableCol, $index)"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed">
                                    <div yb-thead-operate ng-model="itemCol" target-width="tbConf.scrollWidth"></div>
                                </th>
                            </tr>
                            </thead>
                        </table>
                    </div>
                    <div class="td-scroll-y" ng-show="dataList.length > 0">
                        <table class="table-fixed border-none" width="{{tbConf.fixedWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td width="40" class="text-center border-l-none">
                                    <div yb-check-box yb-checked="item.isChecked" yb-click="selectSingle(item)"></div>
                                </td>
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !!itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                       ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="print(item, 'preview')"
                                                ng-disabled="!btnPermission.basisCodePrint" translate translate-attr-title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">预览打印</button>
                                        <button type="button" class="btn btn-operate" ng-click="print(item, 'print')"
                                                ng-disabled="!btnPermission.basisCodePrint" translate translate-attr-title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">打印</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="td-scroll" ng-show="dataList.length > 0" ng-style="tbStyle.scrollLeft">
                        <table class="table-fixed border-none" width="{{tbConf.scrollWidth}}">
                            <tbody>
                            <tr ng-repeat="item in dataList track by $index"
                                ng-class="{'row-selected': $index === markInfo.cueRow}"
                                ng-click="selectRow($index)">
                                <td class="spill-dots" ng-repeat="itemCol in tbConf.tableCol track by $index"
                                    width="{{itemCol.width}}"
                                    ng-show="!!itemCol.isShow && !itemCol.isFixed"
                                    title="{{item[itemCol.dataField]}}">
                                    <span ng-if="!itemCol.clickFn && itemCol.type !== 'operate'">{{item[itemCol.dataField]}}</span>
                                    <a class="btn-operate m-r-xs" ng-click="tdClick(item, itemCol.clickFn)"
                                       ng-if="!!itemCol.clickFn">
                                        {{item[itemCol.dataField]}}
                                    </a>
                                    <div class="font-0" ng-if="itemCol.type === 'operate'">
                                        <button type="button" class="btn btn-operate m-r-xs" ng-click="print(item, 'preview')"
                                                ng-disabled="!btnPermission.basisCodePrint" title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">预览打印</button>
                                        <button type="button" class="btn btn-operate" ng-click="print(item, 'print')"
                                                ng-disabled="!btnPermission.basisCodePrint" title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">打印</button>
                                    </div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                    <div class="no-data w-full text-center p-t" ng-show="dataList.length === 0" translate>暂时没有数据</div>
                </div>
            </div>
            <div class="bottom-area page-bar wrapper-y-sm clearfix">
                <div yb-check-box class="m-t-xs m-r-sm" yb-checked="markInfo.allChecked" yb-check-name="全选"
                     yb-click="selectAll()"></div>
                <button type="button" class="btn btn-operate m-r-sm" ng-click="batchPrint('print')"
                        ng-disabled="!btnPermission.basisCodePrint" translate translate-attr-title="{{!btnPermission.basisCodePrint?'无权限执行此操作':''}}">打印</button>
                <div yb-page-info ng-model="pageInfo" yb-refresh="search()"></div>
            </div>
        </div>
    </div>
</div>

<div id="printXgcy" ng-include="'view/printTemplate/cyTicketTpl.html'" ng-show="false"></div>